<template>
	<view class="cardStyleWp">
		<image src="https://file.casugn.com/storecompcard/temp/bg@2x (1)_1683684486633.png" mode="" class="bgImg">
		</image>
		<view class="mainWp">
			<view class="imgWp">
				<image v-if="userInfo.head" :src="userInfo.head" mode=""></image>
				<image v-else src="https://file.casugn.com/storecompcard/temp/avatar_1683680677336.png" mode="">
				</image>
			</view>
			<view class="rightWp">
				<view class="nameWp">
					<view class="names">
						<text class="u-line-1">{{userInfo.name?userInfo.name:'姓名'}}</text>
					</view>
					<view class="position">
						<text class="u-line-1"> {{userInfo.position?userInfo.position:'职位'}}</text>
					</view>
				</view>
				<view class="company">
					<text class="u-line-1"> {{userInfo.company?userInfo.company:'公司名称'}}</text>
				</view>
			</view>
		</view>
		<view class="infoWp">
			<view class="infoItem ">
				<image src="https://file.casugn.com/storecompcard/temp/general／phone@2x(1)_1681184151521.png"
					mode="" alt="黑色" class="imgs"></image>
				<!-- <image src="https://file.casugn.com/storecompcard/temp/general／phone@2x(3)_1681184211494.png"
					mode="" alt="黄色" class="imgs"></image>
				<image src="https://file.casugn.com/storecompcard/temp/general／phone@2x(2)_1681184135429.png"
					mode="" class="imgs"></image>
				<image src="https://file.casugn.com/storecompcard/temp/general／phone@2x(5)_1681184236479.png" mode=""   alt="蓝色" class="imgs"></image> -->
				<view class="text">
					{{userInfo.mobile?userInfo.mobile:'手机'}} {{userInfo.wechat?`/ ${userInfo.wechat}`:''}}
				</view>
			</view>
			<view class="infoItem ">
				<image src="https://file.casugn.com/storecompcard/temp/general／email@2x(1)_1681184368772.png"
					mode="" class="imgs" alt="黑色邮箱"></image>
				<!-- 	<image src="https://file.casugn.com/storecompcard/temp/general／email@2x(2)_1681184285324.png"
					mode="" class="imgs" alt="白色邮箱"></image>
				<image src="https://file.casugn.com/storecompcard/temp/general／email@2x(5)_1681184332136.png" mode="" class="imgs" alt="蓝色邮箱"></image>
				<image src="https://file.casugn.com/storecompcard/temp/general／email@2x(3)_1681184316537.png"
					mode="" class="imgs" alt="黄色邮箱"></image>
				 -->
				<view class="text">
					{{userInfo.mail?userInfo.mail:'邮箱'}}
				</view>
			</view>
			<view class="infoItem ">
				<image src="https://file.casugn.com/storecompcard/temp/general／location@2x(1)_1681184390942.png"
					mode="" class="imgs" alt="黑色坐标"></image>
				<!-- 
				<image src="https://file.casugn.com/storecompcard/temp/general／location@2x(3)_1681184438414.png"
					mode="" class="imgs" alt="黄色坐标"></image>
				<image src="https://file.casugn.com/storecompcard/temp/general／location@2x(2)_1681184417674.png"
					mode="" class="imgs" alt="坐标"></image>
				<image src="https://file.casugn.com/storecompcard/temp/general／location@2x(5)_1681184458452.png" mode="" class="imgs" alt="蓝色坐标"></image> -->

				<view class="text address">
					<text class="u-line-2">{{userInfo.address?userInfo.address:'地址'}}</text>
				</view>
			</view>
		</view>
		<view class="authStatusWp" v-if="userInfo.authStatus==2">
			<view class="mark " style="color:#fff;">
				未通过企业认证
			</view>
		</view>
		<!-- 预览  -->
		<view style="color:#1D2129;" class="reviewMark" hover-class="reviewMarkHover" @click="goToPreviewMyPage"
			v-if="showReviewMark">
			预览
		</view>
	</view>
</template>

<script>
	export default {
		name: "cardStyle",
		data() {
			return {};
		},
		props: {
			userInfo: {
				type: Object,
				default: () => {},
				required: true
			},
			showReviewMark: {
				type: Boolean,
				default: false
			},
		},
		methods: {
			goToPreviewMyPage() {
				this.$emit('goToPreviewMyPage')
			}
		}

	}
</script>

<style lang="scss" scoped>
	.cardStyleWp {
		margin: 0 auto;
		position: relative;
		width: 686rpx;
		height: 412rpx;
		border-radius: 16rpx;
		overflow: hidden;

		.reviewMark {
			position: absolute;
			right: 10upx;
			top: 10upx;
			font-size: 24rpx;
			padding: 24rpx 24rpx 24rpx 0;
			color: #C9CDD4;
		}

		.reviewMarkHover {
			color: #fff;
		}

		//企业认证标识
		.authStatusWp {
			position: absolute;
			right: 5upx;
			top: 5upx;
			height: 30upx;
			width: 130upx;
			text-align: center;
			font-size: 18upx;

		}

		.bgImg {
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			position: absolute;
			z-index: -1;
			width: 100%;
			height: 100%;
		}

		.mainWp {
			margin-top: 42rpx;
			display: flex;

			.imgWp {
				width: 96rpx;
				height: 96rpx;
				margin: 0 32rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.rightWp {
				.nameWp {
					display: flex;
					align-items: center;

					.names {

						height: 50rpx;
						max-width: 320rpx;
						overflow: hidden;
						font-size: 36rpx;
						font-weight: 600;
						color: #1D2129;
						line-height: 50rpx;
					}

					.position {
						max-width: 150rpx;
						overflow: hidden;
						height: 40rpx;
						font-size: 28rpx;
						font-weight: 400;
						color: #86909C;
						line-height: 39rpx;
						margin-left: 30rpx;
					}
				}


				.company {
					margin-top: 16rpx;
					width: 494rpx;
					height: 34rpx;
					font-size: 24rpx;
					font-weight: 400;
					color: #1D2129;
					line-height: 34rpx;

				}

			}
		}

		.infoWp {
			margin-top: 58rpx;
			margin-left: 40rpx;
			overflow: hidden;

			.infoItem {
				display: flex;
				align-items: flex-start;
				margin-bottom: 24rpx;
				color: #FFF5E4;

				.imgs {
					width: 32rpx;
					height: 32rpx;
				}

				.text {
					margin-left: 16rpx;
					width: 600rpx;
					font-size: 24rpx;
					font-weight: 400;
					color: #1D2129;
				}


			}
		}


	}
</style>